<?php
namespace Home\Org\Util;
class PermissionDatabase
{
    static private $_instance = null;
    private $model;

    static public function getInstance()
    {
        if (is_null(self::$_instance)) {
            self::$_instance = new PermissionDatabase();
        }
        return self::$_instance;
    }

    public function getModel()
    {
        return $this->model;
    }

    private function __construct()
    {
        // 连接其他服务器，其他数据库
        $dataBaseServer = '192.168.1.17';
        $dataBasePort = '3306';
        $dataBase = 'myreport';
        $dataBaseUser = 'root';
        $dataBasePassword = '12Gtwon34';
        $this->model = M();
        $this->model->db(1,"mysql://{$dataBaseUser}:{$dataBasePassword}@{$dataBaseServer}:{$dataBasePort}/{$dataBase}");

    }

}